Conventionally, a mobile telephone is driven by a battery and hence is required to efficiently operate and minimize the power consumption. Conventional mobile telephones have achieved power-saving control by detecting the opening/closing of a housing or a non-operation state for a predetermined time or more. For example, the power supply of the screen of a foldable mobile telephone can be shut down by detecting the closing of a housing by an opening/closing detecting means.
Recently, the multifunction capability and performance of mobile telephones are more and more advancing, and various application programs are provided and usable across networks in addition to application programs originally installed in the mobile telephones. Since, however, various application programs are provided, the power is wasted or the user friendliness worsens if these application programs are controlled in accordance with only the state of a mobile telephone as described above.
For example, if it is unconditionally set that a program is not stopped even when the housing of a mobile telephone is closed, the power supply of the screen is shut down but the execution of a program is continued when the housing is closed while the program is waiting for a user's operation. Accordingly, the CPU unnecessarily continues the operation and wastes the power.
On the other hand, if it is unconditionally set that a program is stopped when the housing of a mobile telephone is closed, the processing of a program that automatically executes a calculation and outputs the result after a user's operation stops when the housing is closed, so the user must wait until the processing is complete when he or she opens the housing again and checks the result. As an example, a program such as a roll playing game that automatically advances the processing for a while after a user's operation causes the user to wait until he or she can input the next operation, and the user sometimes closes the housing and waits. In this case, if the program stops when the housing is closed, the user must wait until he or she can input an operation again when the housing is opened.
Japanese Patent Laid-Open No. 2004-343611 has disclosed a mobile communication terminal that gives an application program setting data indicating whether the program is non-resident, resident, or continuous resident. When the housing of this mobile communication terminal is closed, an application program being executed is temporarily stopped if the program is non-resident or resident, and the execution is continued if the program is non-resident. Accordingly, the mobile communication terminal disclosed in patent reference 1 can execute an application program in accordance with the type of the program.